package com.rpc.byNetty;

import com.rpc.mini.HelloObject;
import com.rpc.mini.HelloService;

/**
 * @author ZhangYongLiang
 * @Date 2021/11/11 18:02
 */
public class TestNettyClient {
    public static void main(String[] args) {
        NettyClient client = new NettyClient("127.0.0.1", 9999);
        RpcClientProxy rpcClientProxy = new RpcClientProxy(client);
        HelloService helloService = rpcClientProxy.getProxy(HelloService.class);
        String res = helloService.hello(new HelloObject(12, "happy 1111"));
        System.out.println(res);
    }
}
